<template>
  <div>
    <van-sticky>
      <div class="foundHeader">
        <van-icon name="arrow-left" @click="back" class="backIcon" />
        <h1>详情</h1>
        <div></div>
      </div>
    </van-sticky>
    <div class="container">
      <h1>{{ list.claimPlace }}</h1>
      <p class="foundTime">{{ list.createTime }}</p>
      <p class="foundTxt">
        <span>失物发现地点：</span>
        {{ list.foundPlace }}
        <span>失物发现时间：</span>
        {{ list.foundTime }}
      </p>
      <div style="height: 50px;"></div>
      <img :src="'http://218.7.112.123:10001/' + list.imgUrl">
    </div>
  </div>
</template>

<script>
import { FoundDetailApi } from "@/service/metro/metroservice";
export default {
  data() {
    return {
      list: [],
    };
  },
  methods: {
    back() {
      this.$router.go(-1);
    },
    async getDetailId() {
      let DetailId = this.$route.query.id;
      let { data } = await FoundDetailApi(DetailId);
      console.log(data);
      if (data.code == 200) {
        this.list = data.data;
        console.log(this.list);
      }
    },
  },
  created() {
    this.getDetailId();
  },
};
</script>

<style lang="scss" scoped>
.foundHeader {
  background-color: skyblue;
  height: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .backIcon {
    color: #fff;
    font-size: 20px;
  }
  h1 {
    font-size: 20px;
    margin-right: 20px;
    color: #fff;
  }
}
.container {
    text-align: center;
  h1 {
    text-align: center;
    font-size: 20px;
    padding-top: 20px;
  }
  .foundTime {
    padding-top: 10px;
    text-align: right;
    margin-right: 20px;
    padding-bottom: 20px;
  }
  .foundTxt {
    text-align: left;
    font-size: 16px;
    span {
        font-size: 20px;
        font-weight: bold;
        display: inline-block;
        width: 50%;
    }
  }
  img {
    width: 80%;
    
  }
}
</style>